package acm.pta6;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class 古风排版 {
    static class Reader {
        private BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        private StringTokenizer tokenizer = new StringTokenizer("");

        private String innerNextLine() {
            try {
                return reader.readLine();
            } catch (IOException ex) {
                return null;
            }
        }

        public boolean hasNext() {
            while (!tokenizer.hasMoreTokens()) {    //内存中没有
                String nextLine = innerNextLine();
                if (nextLine == null) {     //且没有下一行
                    return false;
                }
                tokenizer = new StringTokenizer(nextLine);  //读入一行
            }
            return true;
        }

        public String nextLine() {
            tokenizer = new StringTokenizer("");    //清空内存中的字符
            return innerNextLine();
        }

        public String next() {
            hasNext();
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

    }
    public static void main(String[] args) {
        Reader sc=new Reader();
        int n = sc.nextInt();
        String str = sc.nextLine();
        char[][] chars=new char[n][(int) Math.ceil(1.0*str.length()/n)];
        int index=0;
        for (int j =chars[0].length-1; j>=0; j--) {
            for (int i = 0; i < chars.length; i++) {
                if (index>=str.length())break;
                chars[i][j]=str.charAt(index++);
            }
        }
        for (char[] aChar : chars) {
            for (char c : aChar) {
                if (c!='\0'){
                    System.out.print(c);
                }else {
                    System.out.print(" ");
                }
            }
            System.out.println();
        }
    }
}
